<template>
  <div class="app-container">
    <h2>数据统计</h2>
    <p>这里是数据统计页面</p>

    <el-row :gutter="20">
      <el-col :span="6">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>今日充电量</span>
          </div>
          <div class="card-body">
            <h2>1,234 kWh</h2>
            <p>较昨日 <span style="color: #67C23A">↑12.5%</span></p>
          </div>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>今日订单数</span>
          </div>
          <div class="card-body">
            <h2>89 单</h2>
            <p>较昨日 <span style="color: #67C23A">↑8.3%</span></p>
          </div>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>今日收入</span>
          </div>
          <div class="card-body">
            <h2>¥3,456</h2>
            <p>较昨日 <span style="color: #67C23A">↑15.2%</span></p>
          </div>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>在线充电桩</span>
          </div>
          <div class="card-body">
            <h2>24 台</h2>
            <p>在线率 <span style="color: #67C23A">96%</span></p>
          </div>
        </el-card>
      </el-col>
    </el-row>

    <el-row :gutter="20" style="margin-top: 20px">
      <el-col :span="12">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>充电量趋势</span>
          </div>
          <div class="chart-container">
            <div class="chart-placeholder">
              <p>充电量趋势图表</p>
              <p>（这里可以集成 ECharts 等图表库）</p>
            </div>
          </div>
        </el-card>
      </el-col>
      <el-col :span="12">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>收入统计</span>
          </div>
          <div class="chart-container">
            <div class="chart-placeholder">
              <p>收入统计图表</p>
              <p>（这里可以集成 ECharts 等图表库）</p>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "StatisticsAnalysis"
}
</script>

<style scoped>
.card-body {
  text-align: center;
  padding: 20px 0;
}
.card-body h2 {
  margin: 10px 0;
  font-size: 24px;
  color: #303133;
}
.card-body p {
  margin: 5px 0;
  color: #909399;
}
.chart-container {
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.chart-placeholder {
  text-align: center;
  color: #909399;
}
</style> 